<?php
session_start();
$u_name= $_SESSION['u_name'];
$u_email= $_SESSION['u_email'];
$u_id= $_SESSION['u_id'];
$group= $_SESSION['group'];
mysql_connect("localhost","root","");
mysql_select_db("chat")or die(mysql_error());

@$msg= $_POST['msg'];
	mysql_query("INSERT INTO chat_msg(msg, sender_u_id, for_group_id)VALUES('$msg', '$u_id', '$group')")or die(mysql_error());
	header('location:chatwindow.php')
?>